<template>
  <tag-table ref="table" :data="dataList" :columns="columns" :pagination="false"> </tag-table>
</template>

<script>
export default {
  props: {
    dataList: {
      type: Array,
      required: true,
      default: () => []
    },
    type: {
      type: String,
      default: 'enum'
    }
  },
  created() {
    if (this.type === 'enum') {
      this.columns = [
        {
          show: true,
          label: '枚举值',
          prop: 'cdVal'
        },
        {
          show: true,
          label: '描述',
          prop: 'cdDesc'
        }
      ]
    } else {
      this.columns = [
        {
          show: true,
          label: '参数名称',
          prop: 'paramNm'
        },
        {
          show: true,
          label: '参数字段',
          prop: 'fieldNm'
        }
      ]
    }
  },
  data() {
    return {
      columns: []
    }
  },
  methods: {}
}
</script>

<style lang="scss"></style>
